import { IsString, IsNotEmpty } from 'class-validator';
// import { IfUsernameExist } from '../../validator/usernameExist';

export class UserCreateDto {
  @IsString({ message: '用户名必须为字符类型' })
  @IsNotEmpty({ message: '姓名不能为空' })
  // @IfUsernameExist({message:"username $value already exists."})
  readonly username: string;

  @IsNotEmpty({ message: '密码不能为空' })
  readonly password: string;
}